package com.betterwood.dragon.core.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 小程序配置
 * @author admin060816
 *
 */
@Data
@Component
@ConfigurationProperties(prefix= "wechat-minapp")
public class WechatMinappConfig implements InitializingBean {

	private String appId;
	private String appSecret;
	private String token;
	private TemplateMsg templateMsg = new TemplateMsg();

	public static String APP_ID;

	@Override
	public void afterPropertiesSet() throws Exception {
		APP_ID=getAppId();
	}

	//模板消息集合
	@Data
	public static class TemplateMsg {
		private String getScoreSuccess;
	}
}